package org.dromara.authcode.domain.bo;

import org.dromara.authcode.domain.TDeviceLocation;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 设备位置记录业务对象 t_device_location
 *
 * @author Miles Meng
 * @date 2025-08-11
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = TDeviceLocation.class, reverseConvertGenerate = false)
public class TDeviceLocationBo extends BaseEntity {

    /**
     * 主键
     */
    @NotNull(message = "主键不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 设备ID
     */
    @NotNull(message = "设备ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long deviceId;

    private String macAddress;
    /**
     * 纬度
     */
    @NotNull(message = "纬度不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal latitude;

    /**
     * 经度
     */
    @NotNull(message = "经度不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal longitude;

    /**
     * 定位精度(米)
     */
    private Long accuracy;

    /**
     * 海拔
     */
    private Long altitude;

    /**
     * 速度(m/s)
     */
    private Long speed;

    /**
     * 方向角
     */
    private Long bearing;

    /**
     * 定位时间
     */
    @NotNull(message = "定位时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date locationTime;

    /**
     * 记录时间
     */
    @NotNull(message = "记录时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date recordTime;

    /**
     * 地理位置描述
     */
    private String address;


}
